import apiHandle from '@/utils/request'
import {
  addStudentReq,
  deleteStudentReq,
  getAllStudentReq,
  getAllStudentRes,
  updateStudentInfoReq,
  emourlReq,
  emourlRes
} from './types'
export default {
  getAllStudent: apiHandle<getAllStudentReq, getAllStudentRes>({
    method: 'GET',
    url: 'api/student/list'
  }),
  deleteStudent: apiHandle<deleteStudentReq, null>({
    method: 'DELETE',
    url: 'api/student/remove'
  }),
  updateStudent: apiHandle<updateStudentInfoReq, null>({
    method: 'PUT',
    url: 'api/student/update'
  }),
  addStudent: apiHandle<addStudentReq, null>({
    method: 'POST',
    url: 'api/student/add'
  }),
  getStudentEmourl: apiHandle<emourlReq, emourlRes>({
    method: 'GET',
    url: 'api/student/emourl'
  })
}
